import Layout from '../views/layout/Layout'

const _import = require('./_import_' + process.env.NODE_ENV);

export default {
  path: '/redPharmacy',
  name: 'redPharmacy',
  component: Layout,
  meta: { title: '碧药管理', icon: 'icon' },
  children: [
    {
      path: 'level',
      component: _import('redPharmacy/level/list'),
      name: 'redPharmacyLevel',
      meta: {
        title: '等级管理',
        buttons: {
          edit: { label: '编辑', enabled: true },
          record: { label: '操作记录', enabled: true }
        }
      }
    },
    {
      path: 'operate',
      component: _import('redPharmacy/level/operate-list'),
      name: 'redPharmacyLevelRecord',
      meta: {
        title: '操作记录',
        noCache: true,
        index: '/redPharmacy/level/level',
        buttons: {
          search: { label: '编辑', enabled: true }
        }
      },
      hidden: true
    },
    {
      path: 'level/:id',
      props: true,
      component: _import('redPharmacy/level/edit'),
      name: 'redPharmacyLevelEdit',
      meta: {
        title: '编辑',
        noCache: true,
        index: '/redPharmacy/level/level'
      },
      hidden: true
    },
    {
      path: 'user',
      component: _import('redPharmacy/user/list'),
      name: 'redPharmacyUser',
      meta: {
        title: '用户管理',
        buttons: {
          levelOperateRecord: { label: '等级操作记录', enabled: true },
          detail: { label: '用户关系查看', enabled: true },
          edit: { label: '修改等级', enabled: true },
        }
      }
    },
    {
      path: 'level-operate-record/:boxUserId',
      props: true,
      component: _import('redPharmacy/user/level-operate-list'),
      name: 'redPharmacyUserLevelOperateRecord',
      meta: {
        title: '等级操作记录',
        noCache: true,
        index: '/redPharmacy/level/user',
        buttons: {
          search: { label: '编辑', enabled: true }
        }
      },
      hidden: true
    },
    {
      path: 'integral-operate-record/:boxUserId',
      props: true,
      component: _import('redPharmacy/user/integral-operate-list'),
      name: 'redPharmacyUserIntegralOperateRecord',
      meta: {
        title: '积分操作记录',
        noCache: true,
        index: '/redPharmacy/level/user',
        buttons: {
          search: { label: '编辑', enabled: true }
        }
      },
      hidden: true
    }
  ]
}
